home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1991-10-15 | 7.8 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Oct 15 12:29:26 1991, modified Tue Oct 15 12:29:26 1991, creator 'MPS ', type ASCII, 7124 bytes "SimpleOutFileStuff.c" , at 0x1c54 564 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
49%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
33%
| TrID
| raw Group 3 FAX bitmap
| default (weak)
| |
16%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 14 53 69 6d 70 6c 65 | 4f 75 74 46 69 6c 65 53 |..Simple|OutFileS|
|00000010| 74 75 66 66 2e 63 00 00 | 00 00 00 00 00 00 00 00 |tuff.c..|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 1b d4 00 | 00 02 34 a5 20 c7 e6 a5 |........|..4. ...|
|00000060| 20 c7 e6 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f1 b5 00 00 |........|........|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 0d 2a 0d | 2a 20 66 69 6c 65 3a 20 |*****.*.|* file: |
|000000b0| 53 69 6d 70 6c 65 4f 75 | 74 46 69 6c 65 53 74 75 |SimpleOu|tFileStu|
|000000c0| 66 66 2e 63 0d 2a 0d 2a | 20 50 72 6f 67 72 61 6d |ff.c.*.*| Program|
|000000d0| 3a 20 53 69 6d 70 6c 65 | 4f 75 74 4d 6f 76 69 65 |: Simple|OutMovie|
|000000e0| 73 0d 2a 20 54 68 69 73 | 20 70 72 6f 67 72 61 6d |s.* This| program|
|000000f0| 20 63 72 65 61 74 65 73 | 20 61 20 6d 6f 76 69 65 | creates| a movie|
|00000100| 20 62 79 20 73 70 6f 6f | 6c 69 6e 67 20 69 6e 20 | by spoo|ling in |
|00000110| 50 49 43 54 73 20 66 72 | 6f 6d 20 61 20 66 6f 6c |PICTs fr|om a fol|
|00000120| 64 65 72 0d 2a 20 61 6e | 64 20 61 64 64 69 6e 67 |der.* an|d adding|
|00000130| 20 61 64 64 69 6e 67 20 | 74 68 65 6d 20 6f 6e 65 | adding |them one|
|00000140| 20 61 74 20 61 20 74 69 | 6d 65 20 74 6f 20 74 68 | at a ti|me to th|
|00000150| 65 20 6d 6f 76 69 65 2e | 20 57 68 65 6e 20 61 6c |e movie.| When al|
|00000160| 6c 20 50 49 43 54 73 20 | 68 61 76 65 0d 2a 20 62 |l PICTs |have.* b|
|00000170| 65 65 6e 20 70 72 6f 63 | 65 73 73 65 64 20 61 20 |een proc|essed a |
|00000180| 73 6f 75 6e 64 20 74 72 | 61 63 6b 20 69 73 20 61 |sound tr|ack is a|
|00000190| 64 64 65 64 20 69 66 20 | 6f 6e 65 20 69 73 20 70 |dded if |one is p|
|000001a0| 72 65 73 65 6e 74 2e 0d | 2a 0d 2a 20 54 68 69 73 |resent..|*.* This|
|000001b0| 20 70 72 6f 67 72 61 6d | 20 75 73 65 73 20 74 68 | program| uses th|
|000001c0| 65 20 73 65 71 75 65 6e | 63 65 20 63 6f 6d 70 72 |e sequen|ce compr|
|000001d0| 65 73 73 69 6f 6e 20 63 | 6f 6d 6d 61 6e 64 73 0d |ession c|ommands.|
|000001e0| 2a 20 77 68 69 63 68 20 | 6d 61 6b 65 20 73 6d 61 |* which |make sma|
|000001f0| 6c 6c 65 72 20 6d 6f 76 | 69 65 20 66 69 6c 65 73 |ller mov|ie files|
|00000200| 20 62 79 20 6f 6e 6c 79 | 20 73 61 76 69 6e 67 0d | by only| saving.|
|00000210| 2a 20 74 68 65 20 63 68 | 61 6e 67 65 73 20 62 65 |* the ch|anges be|
|00000220| 74 77 65 65 6e 20 66 72 | 61 6d 65 73 0d 2a 0d 2a |tween fr|ames.*.*|
|00000230| 20 49 6e 20 74 68 69 73 | 20 66 69 6c 65 20 49 20 | In this| file I |
|00000240| 68 61 76 65 20 63 6f 6c | 6c 65 63 74 65 64 20 61 |have col|lected a|
|00000250| 6c 6c 20 72 6f 75 74 69 | 6e 65 73 20 68 61 76 69 |ll routi|nes havi|
|00000260| 6e 67 20 74 6f 20 64 6f | 20 77 69 74 68 0d 2a 20 |ng to do| with.* |
|00000270| 66 69 6c 65 20 49 2f 4f | 0d 2a 0d 2a 20 42 79 20 |file I/O|.*.* By |
|00000280| 47 75 69 6c 6c 65 72 6d | 6f 20 41 2e 20 4f 72 74 |Guillerm|o A. Ort|
|00000290| 69 7a 20 0d 2a 20 41 70 | 72 69 6c 20 31 39 39 31 |iz .* Ap|ril 1991|
|000002a0| 0d 2a 0d 2a 09 41 70 70 | 6c 65 20 4d 61 63 69 6e |.*.*.App|le Macin|
|000002b0| 74 6f 73 68 20 44 65 76 | 65 6c 6f 70 65 72 20 54 |tosh Dev|eloper T|
|000002c0| 65 63 68 6e 69 63 61 6c | 20 53 75 70 70 6f 72 74 |echnical| Support|
|000002d0| 0d 2a 0d 2a 09 43 6f 70 | 79 72 69 67 68 74 20 a9 |.*.*.Cop|yright .|
|000002e0| 20 31 39 38 39 2d 31 39 | 39 31 20 41 70 70 6c 65 | 1989-19|91 Apple|
|000002f0| 20 43 6f 6d 70 75 74 65 | 72 2c 20 49 6e 63 2e 0d | Compute|r, Inc..|
|00000300| 2a 09 41 6c 6c 20 72 69 | 67 68 74 73 20 72 65 73 |*.All ri|ghts res|
|00000310| 65 72 76 65 64 2e 0d 2a | 0d 2a 2a 2a 2a 2a 2a 2a |erved..*|.*******|
|00000320| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000330| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0d |********|******/.|
|00000340| 20 0d 0d 23 69 6e 63 6c | 75 64 65 20 3c 54 79 70 | ..#incl|ude <Typ|
|00000350| 65 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |es.h>.#i|nclude <|
|00000360| 51 75 69 63 6b 44 72 61 | 77 2e 68 3e 0d 23 69 6e |QuickDra|w.h>.#in|
|00000370| 63 6c 75 64 65 20 3c 54 | 6f 6f 6c 55 74 69 6c 73 |clude <T|oolUtils|
|00000380| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 45 76 |.h>.#inc|lude <Ev|
|00000390| 65 6e 74 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |ents.h>.|#include|
|000003a0| 20 3c 43 6f 6e 74 72 6f | 6c 73 2e 68 3e 0d 23 69 | <Contro|ls.h>.#i|
|000003b0| 6e 63 6c 75 64 65 20 3c | 57 69 6e 64 6f 77 73 2e |nclude <|Windows.|
|000003c0| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 44 69 61 |h>.#incl|ude <Dia|
|000003d0| 6c 6f 67 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |logs.h>.|#include|
|000003e0| 20 3c 4d 65 6e 75 73 2e | 68 3e 0d 23 69 6e 63 6c | <Menus.|h>.#incl|
|000003f0| 75 64 65 20 3c 44 65 73 | 6b 2e 68 3e 0d 23 69 6e |ude <Des|k.h>.#in|
|00000400| 63 6c 75 64 65 20 3c 53 | 65 67 4c 6f 61 64 2e 68 |clude <S|egLoad.h|
|00000410| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 46 69 6c 65 |>.#inclu|de <File|
|00000420| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 4f |s.h>.#in|clude <O|
|00000430| 53 45 76 65 6e 74 73 2e | 68 3e 0d 23 69 6e 63 6c |SEvents.|h>.#incl|
|00000440| 75 64 65 20 3c 54 72 61 | 70 73 2e 68 3e 0d 23 69 |ude <Tra|ps.h>.#i|
|00000450| 6e 63 6c 75 64 65 20 3c | 46 6f 6e 74 73 2e 68 3e |nclude <|Fonts.h>|
|00000460| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 4f 53 55 74 69 |.#includ|e <OSUti|
|00000470| 6c 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ls.h>.#i|nclude <|
|00000480| 52 65 73 6f 75 72 63 65 | 73 2e 68 3e 0d 23 69 6e |Resource|s.h>.#in|
|00000490| 63 6c 75 64 65 20 3c 4d | 65 6d 6f 72 79 2e 68 3e |clude <M|emory.h>|
|000004a0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 50 61 63 6b 61 |.#includ|e <Packa|
|000004b0| 67 65 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ges.h>.#|include |
|000004c0| 3c 4c 69 73 74 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |<Lists.h|>.#inclu|
|000004d0| 64 65 20 3c 46 69 6c 65 | 73 2e 68 3e 0d 23 69 6e |de <File|s.h>.#in|
|000004e0| 63 6c 75 64 65 20 3c 65 | 72 72 6f 72 73 2e 68 3e |clude <e|rrors.h>|
|000004f0| 0d 0d 2f 2a 20 53 54 52 | 23 20 72 65 73 6f 75 72 |../* STR|# resour|
|00000500| 63 65 73 20 2a 2f 0d 23 | 64 65 66 69 6e 65 20 72 |ces */.#|define r|
|00000510| 53 74 72 4d 69 73 63 09 | 09 32 35 36 0d 0d 2f 2a |StrMisc.|.256../*|
|00000520| 20 52 65 73 6f 75 72 63 | 65 20 49 44 27 73 20 66 | Resourc|e ID's f|
|00000530| 6f 72 20 53 74 61 6e 64 | 61 72 64 20 46 69 6c 65 |or Stand|ard File|
|00000540| 20 44 69 61 6c 6f 67 20 | 2a 2f 0d 23 64 65 66 69 | Dialog |*/.#defi|
|00000550| 6e 65 20 72 47 65 74 44 | 69 72 65 63 74 6f 72 79 |ne rGetD|irectory|
|00000560| 44 4c 4f 47 09 31 30 30 | 32 0d 0d 2f 2a 20 72 65 |DLOG.100|2../* re|
|00000570| 73 6f 75 72 63 65 73 20 | 66 6f 72 20 74 68 65 20 |sources |for the |
|00000580| 73 6f 75 6e 64 20 61 6c | 65 72 74 20 2a 2f 0d 0d |sound al|ert */..|
|00000590| 23 64 65 66 69 6e 65 20 | 6b 48 61 73 53 6f 75 6e |#define |kHasSoun|
|000005a0| 64 20 09 31 0d 23 64 65 | 66 69 6e 65 20 72 53 6f |d .1.#de|fine rSo|
|000005b0| 75 6e 64 41 6c 65 72 74 | 20 31 32 38 0d 0d 23 64 |undAlert| 128..#d|
|000005c0| 65 66 69 6e 65 20 43 75 | 72 44 69 72 53 74 6f 72 |efine Cu|rDirStor|
|000005d0| 65 09 09 30 78 33 39 38 | 09 09 2f 2a 20 44 69 72 |e..0x398|../* Dir|
|000005e0| 49 44 20 6f 66 20 63 75 | 72 72 65 6e 74 20 64 69 |ID of cu|rrent di|
|000005f0| 72 65 63 74 6f 72 79 20 | 5b 4c 4f 4e 47 5d 09 09 |rectory |[LONG]..|
|00000600| 2a 2f 0d 23 64 65 66 69 | 6e 65 20 66 69 72 73 74 |*/.#defi|ne first|
|00000610| 54 69 6d 65 09 09 2d 31 | 20 20 2f 2a 20 74 68 65 |Time..-1| /* the|
|00000620| 20 66 69 72 73 74 20 74 | 69 6d 65 20 6f 75 72 20 | first t|ime our |
|00000630| 68 6f 6f 6b 20 69 73 20 | 63 61 6c 6c 65 64 2c 20 |hook is |called, |
|00000640| 69 74 20 69 73 20 70 61 | 73 73 65 64 20 61 20 2d |it is pa|ssed a -|
|00000650| 31 20 2a 2f 0d 0d 4f 53 | 45 72 72 20 4f 70 65 6e |1 */..OS|Err Open|
|00000660| 4f 6e 65 46 69 6c 65 28 | 50 69 63 48 61 6e 64 6c |OneFile(|PicHandl|
|00000670| 65 20 70 2c 20 73 68 6f | 72 74 20 69 6e 64 65 78 |e p, sho|rt index|
|00000680| 29 3b 0d 0d 48 61 6e 64 | 6c 65 20 4d 79 47 65 74 |);..Hand|le MyGet|
|00000690| 53 46 32 28 76 6f 69 64 | 29 3b 0d 4f 53 45 72 72 |SF2(void|);.OSErr|
|000006a0| 20 4d 79 47 65 74 53 46 | 28 46 53 53 70 65 63 20 | MyGetSF|(FSSpec |
|000006b0| 2a 29 3b 0d 0d 2f 2a 20 | 66 6f 72 20 53 65 74 44 |*);../* |for SetD|
|000006c0| 69 72 65 63 74 6f 72 79 | 20 73 61 6d 70 6c 65 20 |irectory| sample |
|000006d0| 2a 2f 0d 6c 6f 6e 67 09 | 09 09 4d 79 43 75 72 44 |*/.long.|..MyCurD|
|000006e0| 69 72 3b 0d 42 6f 6f 6c | 65 61 6e 09 09 09 43 75 |ir;.Bool|ean...Cu|
|000006f0| 72 44 69 72 56 61 6c 69 | 64 3b 0d 0d 2f 2a 20 73 |rDirVali|d;../* s|
|00000700| 6f 6d 65 20 67 6c 6f 62 | 61 6c 73 20 2a 2f 0d 53 |ome glob|als */.S|
|00000710| 46 52 65 70 6c 79 09 09 | 09 72 65 70 6c 79 3b 09 |FReply..|.reply;.|
|00000720| 09 09 2f 2a 20 75 73 65 | 64 20 69 6e 20 61 6c 6c |../* use|d in all|
|00000730| 20 53 46 20 73 61 6d 70 | 6c 65 73 20 2a 2f 0d 50 | SF samp|les */.P|
|00000740| 6f 69 6e 74 09 09 09 67 | 4c 6f 63 61 74 69 6f 6e |oint...g|Location|
|00000750| 20 3d 20 7b 30 78 34 30 | 2c 30 78 34 30 7d 3b 0d | = {0x40|,0x40};.|
|00000760| 53 46 54 79 70 65 4c 69 | 73 74 09 09 74 79 70 65 |SFTypeLi|st..type|
|00000770| 4c 69 73 74 20 3d 20 7b | 27 46 53 53 44 27 7d 3b |List = {|'FSSD'};|
|00000780| 09 09 2f 2a 20 67 69 6d | 6d 69 65 20 73 6f 75 6e |../* gim|mie soun|
|00000790| 64 20 66 69 6c 65 73 20 | 2a 2f 0d 0d 2f 2a 2a 2a |d files |*/../***|
|000007a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000007b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000007c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000007d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000007e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0d 70 61 73 |********|***/.pas|
|000007f0| 63 61 6c 20 73 68 6f 72 | 74 20 4d 79 47 65 74 44 |cal shor|t MyGetD|
|00000800| 69 72 48 6f 6f 6b 28 69 | 74 65 6d 2c 20 64 50 74 |irHook(i|tem, dPt|
|00000810| 72 29 0d 09 73 68 6f 72 | 74 09 09 69 74 65 6d 3b |r)..shor|t..item;|
|00000820| 0d 09 44 69 61 6c 6f 67 | 50 74 72 09 64 50 74 72 |..Dialog|Ptr.dPtr|
|00000830| 3b 0d 7b 0d 2f 2a 20 45 | 71 75 61 74 65 73 20 66 |;.{./* E|quates f|
|00000840| 6f 72 20 74 68 65 20 69 | 74 6d 65 73 20 74 68 61 |or the i|tmes tha|
|00000850| 74 20 49 27 76 65 20 61 | 64 64 65 64 20 2a 2f 0d |t I've a|dded */.|
|00000860| 23 64 65 66 69 6e 65 20 | 67 65 74 44 69 72 42 75 |#define |getDirBu|
|00000870| 74 74 6f 6e 20 31 31 0d | 23 64 65 66 69 6e 65 20 |tton 11.|#define |
|00000880| 67 65 74 44 69 72 4e 6f | 77 42 75 74 74 6f 6e 20 |getDirNo|wButton |
|00000890| 31 32 0d 23 64 65 66 69 | 6e 65 20 67 65 74 44 69 |12.#defi|ne getDi|
|000008a0| 72 4d 65 73 73 61 67 65 | 20 31 33 0d 0d 09 53 74 |rMessage| 13...St|
|000008b0| 72 32 35 35 09 6d 65 73 | 73 61 67 65 54 69 74 6c |r255.mes|sageTitl|
|000008c0| 65 3b 0d 09 73 68 6f 72 | 74 09 6b 69 6e 64 3b 0d |e;..shor|t.kind;.|
|000008d0| 09 48 61 6e 64 6c 65 09 | 68 3b 0d 09 52 65 63 74 |.Handle.|h;..Rect|
|000008e0| 09 72 3b 0d 0d 09 73 77 | 69 74 63 68 20 28 69 74 |.r;...sw|itch (it|
|000008f0| 65 6d 29 20 7b 0d 09 09 | 63 61 73 65 20 66 69 72 |em) {...|case fir|
|00000900| 73 74 54 69 6d 65 3a 0d | 0d 09 09 09 2f 2a 20 52 |stTime:.|..../* R|
|00000910| 65 61 64 20 69 6e 20 74 | 68 65 20 70 72 6f 6d 70 |ead in t|he promp|
|00000920| 74 20 73 74 72 69 6e 67 | 20 66 72 6f 6d 20 74 68 |t string| from th|
|00000930| 65 20 72 65 73 6f 75 72 | 63 65 20 66 6f 72 6b 2c |e resour|ce fork,|
|00000940| 20 61 6e 64 20 69 6e 69 | 74 69 61 6c 69 7a 65 20 | and ini|tialize |
|00000950| 2a 2f 0d 09 09 09 2f 2a | 20 43 75 72 44 69 72 56 |*/..../*| CurDirV|
|00000960| 61 6c 69 64 20 74 6f 20 | 46 41 4c 53 45 2e 20 2a |alid to |FALSE. *|
|00000970| 2f 0d 0d 09 09 09 47 65 | 74 49 6e 64 53 74 72 69 |/.....Ge|tIndStri|
|00000980| 6e 67 28 26 6d 65 73 73 | 61 67 65 54 69 74 6c 65 |ng(&mess|ageTitle|
|00000990| 2c 72 53 74 72 4d 69 73 | 63 2c 33 29 3b 0d 09 09 |,rStrMis|c,3);...|
|000009a0| 09 47 65 74 44 49 74 65 | 6d 28 64 50 74 72 2c 67 |.GetDIte|m(dPtr,g|
|000009b0| 65 74 44 69 72 4d 65 73 | 73 61 67 65 2c 26 6b 69 |etDirMes|sage,&ki|
|000009c0| 6e 64 2c 26 68 2c 26 72 | 29 3b 0d 09 09 09 53 65 |nd,&h,&r|);....Se|
|000009d0| 74 49 54 65 78 74 28 68 | 2c 26 6d 65 73 73 61 67 |tIText(h|,&messag|
|000009e0| 65 54 69 74 6c 65 29 3b | 0d 09 09 09 43 75 72 44 |eTitle);|....CurD|
|000009f0| 69 72 56 61 6c 69 64 20 | 3d 20 66 61 6c 73 65 3b |irValid |= false;|
|00000a00| 0d 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 63 61 73 |....brea|k;...cas|
|00000a10| 65 20 67 65 74 44 69 72 | 42 75 74 74 6f 6e 3a 0d |e getDir|Button:.|
|00000a20| 09 09 09 69 66 20 28 72 | 65 70 6c 79 2e 66 54 79 |...if (r|eply.fTy|
|00000a30| 70 65 20 21 3d 20 30 29 | 20 7b 0d 09 09 09 09 4d |pe != 0)| {.....M|
|00000a40| 79 43 75 72 44 69 72 20 | 3d 20 72 65 70 6c 79 2e |yCurDir |= reply.|
|00000a50| 66 54 79 70 65 3b 0d 09 | 09 09 09 43 75 72 44 69 |fType;..|...CurDi|
|00000a60| 72 56 61 6c 69 64 20 3d | 20 74 72 75 65 3b 0d 09 |rValid =| true;..|
|00000a70| 09 09 09 72 65 74 75 72 | 6e 28 67 65 74 43 61 6e |...retur|n(getCan|
|00000a80| 63 65 6c 29 3b 0d 09 09 | 09 7d 3b 0d 09 09 09 62 |cel);...|.};....b|
|00000a90| 72 65 61 6b 3b 0d 09 09 | 63 61 73 65 20 67 65 74 |reak;...|case get|
|00000aa0| 44 69 72 4e 6f 77 42 75 | 74 74 6f 6e 3a 0d 09 09 |DirNowBu|tton:...|
|00000ab0| 09 4d 79 43 75 72 44 69 | 72 20 3d 20 2a 28 6c 6f |.MyCurDi|r = *(lo|
|00000ac0| 6e 67 20 2a 29 43 75 72 | 44 69 72 53 74 6f 72 65 |ng *)Cur|DirStore|
|00000ad0| 3b 0d 09 09 09 43 75 72 | 44 69 72 56 61 6c 69 64 |;....Cur|DirValid|
|00000ae0| 20 3d 20 74 72 75 65 3b | 0d 09 09 09 72 65 74 75 | = true;|....retu|
|00000af0| 72 6e 28 67 65 74 43 61 | 6e 63 65 6c 29 3b 0d 09 |rn(getCa|ncel);..|
|00000b00| 7d 3b 0d 09 72 65 74 75 | 72 6e 28 69 74 65 6d 29 |};..retu|rn(item)|
|00000b10| 3b 09 2f 2a 20 42 79 20 | 64 65 66 61 75 6c 74 2c |;./* By |default,|
|00000b20| 20 72 65 74 75 72 6e 20 | 74 68 65 20 69 74 65 6d | return |the item|
|00000b30| 20 70 61 73 73 65 64 20 | 74 6f 20 75 73 2e 20 2a | passed |to us. *|
|00000b40| 2f 0d 7d 3b 0d 0d 0d 70 | 61 73 63 61 6c 20 42 6f |/.};...p|ascal Bo|
|00000b50| 6f 6c 65 61 6e 20 46 6f | 6c 64 65 72 73 4f 6e 6c |olean Fo|ldersOnl|
|00000b60| 79 28 70 29 0d 09 50 61 | 72 6d 42 6c 6b 50 74 72 |y(p)..Pa|rmBlkPtr|
|00000b70| 20 70 3b 0d 7b 0d 09 2f | 2a 20 4e 6f 72 6d 61 6c | p;.{../|* Normal|
|00000b80| 6c 79 2c 20 66 6f 6c 64 | 65 72 73 20 61 72 65 20 |ly, fold|ers are |
|00000b90| 41 4c 57 41 59 53 20 73 | 68 6f 77 6e 2c 20 61 6e |ALWAYS s|hown, an|
|00000ba0| 64 20 61 72 65 6e 27 74 | 20 65 76 65 6e 20 70 61 |d aren't| even pa|
|00000bb0| 73 73 65 64 20 74 6f 09 | 09 2a 2f 0d 09 2f 2a 20 |ssed to.|.*/../* |
|00000bc0| 74 68 69 73 20 66 69 6c | 65 20 66 69 6c 74 65 72 |this fil|e filter|
|00000bd0| 20 66 6f 72 20 6a 75 64 | 67 65 6d 65 6e 74 2e 20 | for jud|gement. |
|00000be0| 55 6e 64 65 72 20 73 75 | 63 68 20 63 69 72 63 75 |Under su|ch circu|
|00000bf0| 6d 73 74 61 6e 63 65 73 | 2c 20 69 74 20 69 73 09 |mstances|, it is.|
|00000c00| 09 2a 2f 0d 09 2f 2a 20 | 6f 6e 6c 79 20 6e 65 63 |.*/../* |only nec|
|00000c10| 65 73 73 61 72 79 20 74 | 6f 20 62 6c 69 6e 64 6c |essary t|o blindl|
|00000c20| 79 20 72 65 74 75 72 6e | 20 54 52 55 45 20 28 61 |y return| TRUE (a|
|00000c30| 6c 6c 6f 77 20 6e 6f 20 | 66 69 6c 65 73 20 77 68 |llow no |files wh|
|00000c40| 61 74 73 6f 65 76 65 72 | 29 2e 09 2a 2f 0d 09 2f |atsoever|)..*/../|
|00000c50| 2a 20 48 6f 77 65 76 65 | 72 2c 20 53 74 61 6e 64 |* Howeve|r, Stand|
|00000c60| 61 72 64 20 46 69 6c 65 | 20 69 73 20 6e 6f 74 20 |ard File| is not |
|00000c70| 64 6f 63 75 6d 65 6e 74 | 65 64 20 69 6e 20 73 75 |document|ed in su|
|00000c80| 63 68 20 61 20 6d 61 6e | 6e 65 72 2c 20 61 6e 64 |ch a man|ner, and|
|00000c90| 09 09 2a 2f 0d 09 2f 2a | 20 74 68 69 73 20 66 65 |..*/../*| this fe|
|00000ca0| 61 74 75 72 65 20 6d 61 | 79 20 6e 6f 74 20 62 65 |ature ma|y not be|
|00000cb0| 20 54 52 55 45 20 69 6e | 20 74 68 65 20 66 75 74 | TRUE in| the fut|
|00000cc0| 75 72 65 2e 20 54 68 65 | 72 65 66 6f 72 65 2c 20 |ure. The|refore, |
|00000cd0| 77 65 20 44 4f 20 63 68 | 65 63 6b 09 2a 2f 0d 09 |we DO ch|eck.*/..|
|00000ce0| 2f 2a 20 74 6f 20 73 65 | 65 20 69 66 20 74 68 65 |/* to se|e if the|
|00000cf0| 20 65 6e 74 72 79 20 70 | 61 73 73 65 64 20 74 6f | entry p|assed to|
|00000d00| 20 75 73 20 64 65 73 63 | 72 69 62 65 73 20 61 20 | us desc|ribes a |
|00000d10| 66 69 6c 65 20 6f 72 20 | 61 20 64 69 72 65 63 74 |file or |a direct|
|00000d20| 6f 72 79 2e 09 2a 2f 0d | 0d 09 69 66 20 28 28 70 |ory..*/.|..if ((p|
|00000d30| 2d 3e 66 69 6c 65 50 61 | 72 61 6d 2e 69 6f 46 6c |->filePa|ram.ioFl|
|00000d40| 41 74 74 72 69 62 20 26 | 20 30 78 31 30 29 20 21 |Attrib &| 0x10) !|
|00000d50| 3d 20 30 29 0d 09 09 72 | 65 74 75 72 6e 28 66 61 |= 0)...r|eturn(fa|
|00000d60| 6c 73 65 29 3b 0d 09 72 | 65 74 75 72 6e 28 74 72 |lse);..r|eturn(tr|
|00000d70| 75 65 29 3b 0d 7d 3b 0d | 0d 0d 76 6f 69 64 20 47 |ue);.};.|..void G|
|00000d80| 65 74 44 69 72 65 63 74 | 6f 72 79 28 29 0d 7b 0d |etDirect|ory().{.|
|00000d90| 09 0d 09 53 46 50 47 65 | 74 46 69 6c 65 28 67 4c |...SFPGe|tFile(gL|
|00000da0| 6f 63 61 74 69 6f 6e 2c | 09 2f 2a 20 6c 6f 63 61 |ocation,|./* loca|
|00000db0| 74 69 6f 6e 20 2a 2f 0d | 09 09 22 5c 70 53 70 61 |tion */.|.."\pSpa|
|00000dc0| 63 65 20 66 6f 72 20 52 | 65 6e 74 22 2c 09 2f 2a |ce for R|ent",./*|
|00000dd0| 20 76 65 73 74 69 67 69 | 61 6c 20 73 74 72 69 6e | vestigi|al strin|
|00000de0| 67 20 2a 2f 0d 09 09 46 | 6f 6c 64 65 72 73 4f 6e |g */...F|oldersOn|
|00000df0| 6c 79 2c 09 09 2f 2a 20 | 66 69 6c 65 46 69 6c 74 |ly,../* |fileFilt|
|00000e00| 65 72 20 2a 2f 0d 09 09 | 2d 31 2c 09 09 09 09 09 |er */...|-1,.....|
|00000e10| 2f 2a 20 6e 75 6d 74 79 | 70 65 73 3b 20 2d 31 20 |/* numty|pes; -1 |
|00000e20| 6d 65 61 6e 73 20 61 6c | 6c 20 2a 2f 0d 09 09 26 |means al|l */...&|
|00000e30| 74 79 70 65 4c 69 73 74 | 2c 09 09 09 2f 2a 20 61 |typeList|,.../* a|
|00000e40| 72 72 61 79 20 74 6f 20 | 74 79 70 65 73 20 74 6f |rray to |types to|
|00000e50| 20 73 68 6f 77 20 2a 2f | 0d 09 09 4d 79 47 65 74 | show */|...MyGet|
|00000e60| 44 69 72 48 6f 6f 6b 2c | 09 09 2f 2a 20 64 6c 67 |DirHook,|../* dlg|
|00000e70| 48 6f 6f 6b 20 2a 2f 0d | 09 09 26 72 65 70 6c 79 |Hook */.|..&reply|
|00000e80| 2c 09 09 09 09 2f 2a 20 | 72 65 63 6f 72 64 20 66 |,..../* |record f|
|00000e90| 6f 72 20 72 65 74 75 72 | 6e 65 64 20 76 61 6c 75 |or retur|ned valu|
|00000ea0| 65 73 20 2a 2f 0d 09 09 | 72 47 65 74 44 69 72 65 |es */...|rGetDire|
|00000eb0| 63 74 6f 72 79 44 4c 4f | 47 2c 0d 09 09 6e 69 6c |ctoryDLO|G,...nil|
|00000ec0| 29 3b 0d 0d 7d 3b 0d 0d | 2f 2a 20 68 65 72 65 20 |);..};..|/* here |
|00000ed0| 77 65 20 67 65 74 20 65 | 61 63 68 20 70 69 63 74 |we get e|ach pict|
|00000ee0| 75 72 65 20 6f 6e 65 20 | 61 74 20 74 68 65 20 74 |ure one |at the t|
|00000ef0| 69 6d 65 2e 0d 20 20 20 | 54 68 69 73 20 66 75 6e |ime.. |This fun|
|00000f00| 63 74 69 6f 6e 20 73 65 | 6c 65 63 74 73 20 74 68 |ction se|lects th|
|00000f10| 65 20 66 69 6c 65 20 69 | 6e 20 73 65 71 75 65 6e |e file i|n sequen|
|00000f20| 74 69 61 6c 20 6f 72 64 | 65 72 20 69 6e 20 74 68 |tial ord|er in th|
|00000f30| 65 0d 20 20 20 73 65 6c | 65 63 74 65 64 20 66 6f |e. sel|ected fo|
|00000f40| 6c 64 65 72 20 61 6e 64 | 20 72 65 61 64 73 20 69 |lder and| reads i|
|00000f50| 6e 20 74 68 65 20 50 49 | 43 54 2e 20 54 68 65 20 |n the PI|CT. The |
|00000f60| 50 49 43 54 20 69 73 20 | 73 74 6f 72 65 64 20 69 |PICT is |stored i|
|00000f70| 6e 0d 20 20 20 61 20 68 | 61 6e 64 6c 65 20 70 72 |n. a h|andle pr|
|00000f80| 6f 76 69 64 65 64 20 62 | 79 20 74 68 65 20 63 61 |ovided b|y the ca|
|00000f90| 6c 6c 65 72 2e 20 0d 20 | 20 20 0d 20 20 20 57 68 |ller. . | . Wh|
|00000fa0| 65 6e 20 74 68 65 20 66 | 6f 6c 64 65 72 20 63 6f |en the f|older co|
|00000fb0| 6e 74 61 69 6e 73 20 66 | 69 6c 65 73 20 74 68 61 |ntains f|iles tha|
|00000fc0| 74 20 61 72 65 20 6e 6f | 74 20 50 49 43 54 20 74 |t are no|t PICT t|
|00000fd0| 68 65 20 72 6f 75 74 69 | 6e 65 20 72 65 74 75 72 |he routi|ne retur|
|00000fe0| 6e 73 20 77 69 74 68 0d | 20 20 20 6e 6f 20 65 72 |ns with.| no er|
|00000ff0| 72 6f 72 20 62 75 74 20 | 73 65 74 73 20 74 68 65 |ror but |sets the|
|00001000| 20 73 69 7a 65 20 6f 66 | 20 74 68 65 20 70 69 63 | size of| the pic|
|00001010| 74 20 68 61 6e 64 6c 65 | 20 74 6f 20 31 30 20 73 |t handle| to 10 s|
|00001020| 69 67 6e 61 6c 69 6e 67 | 20 74 68 65 20 63 61 6c |ignaling| the cal|
|00001030| 6c 69 6e 67 0d 20 20 20 | 70 61 72 74 79 20 74 68 |ling. |party th|
|00001040| 61 74 20 61 6c 74 68 6f | 75 67 68 74 20 74 68 65 |at altho|ught the|
|00001050| 20 66 69 6c 65 20 69 73 | 20 74 68 65 72 65 20 69 | file is| there i|
|00001060| 74 20 64 6f 65 73 20 6e | 6f 74 20 63 6f 6e 74 61 |t does n|ot conta|
|00001070| 69 6e 20 61 20 70 69 63 | 74 75 72 65 2e 0d 20 20 |in a pic|ture.. |
|00001080| 20 0d 20 20 20 57 72 69 | 74 69 6e 67 20 74 68 69 | . Wri|ting thi|
|00001090| 73 20 77 61 73 20 67 72 | 65 61 74 20 66 75 6e 2e |s was gr|eat fun.|
|000010a0| 0d 20 20 20 2a 2f 0d 4f | 53 45 72 72 20 4f 70 65 |. */.O|SErr Ope|
|000010b0| 6e 4f 6e 65 46 69 6c 65 | 28 50 69 63 48 61 6e 64 |nOneFile|(PicHand|
|000010c0| 6c 65 20 70 2c 20 73 68 | 6f 72 74 20 69 6e 64 65 |le p, sh|ort inde|
|000010d0| 78 29 0d 7b 09 0d 43 49 | 6e 66 6f 50 42 52 65 63 |x).{..CI|nfoPBRec|
|000010e0| 20 70 62 3b 0d 53 74 72 | 32 35 35 09 73 3b 0d 4f | pb;.Str|255.s;.O|
|000010f0| 53 45 72 72 20 09 65 72 | 72 3b 0d 6c 6f 6e 67 09 |SErr .er|r;.long.|
|00001100| 66 4c 65 6e 67 74 68 3b | 0d 73 68 6f 72 74 20 09 |fLength;|.short .|
|00001110| 46 52 65 66 4e 75 6d 3b | 0d 0d 20 20 69 66 20 28 |FRefNum;|.. if (|
|00001120| 43 75 72 44 69 72 56 61 | 6c 69 64 29 20 7b 20 2f |CurDirVa|lid) { /|
|00001130| 2a 20 73 65 6c 65 63 74 | 69 6f 6e 20 6f 66 20 66 |* select|ion of f|
|00001140| 6f 6c 64 65 72 20 77 65 | 6e 74 20 6f 6b 20 2a 2f |older we|nt ok */|
|00001150| 0d 20 20 09 70 62 2e 68 | 46 69 6c 65 49 6e 66 6f |. .pb.h|FileInfo|
|00001160| 2e 69 6f 43 6f 6d 70 6c | 65 74 69 6f 6e 20 3d 20 |.ioCompl|etion = |
|00001170| 6e 69 6c 3b 0d 09 70 62 | 2e 68 46 69 6c 65 49 6e |nil;..pb|.hFileIn|
|00001180| 66 6f 2e 69 6f 4e 61 6d | 65 50 74 72 20 3d 20 26 |fo.ioNam|ePtr = &|
|00001190| 73 3b 0d 09 70 62 2e 68 | 46 69 6c 65 49 6e 66 6f |s;..pb.h|FileInfo|
|000011a0| 2e 69 6f 56 52 65 66 4e | 75 6d 20 3d 20 72 65 70 |.ioVRefN|um = rep|
|000011b0| 6c 79 2e 76 52 65 66 4e | 75 6d 3b 0d 09 70 62 2e |ly.vRefN|um;..pb.|
|000011c0| 68 46 69 6c 65 49 6e 66 | 6f 2e 69 6f 46 44 69 72 |hFileInf|o.ioFDir|
|000011d0| 49 6e 64 65 78 20 3d 20 | 69 6e 64 65 78 3b 0d 09 |Index = |index;..|
|000011e0| 70 62 2e 68 46 69 6c 65 | 49 6e 66 6f 2e 69 6f 44 |pb.hFile|Info.ioD|
|000011f0| 69 72 49 44 20 3d 20 4d | 79 43 75 72 44 69 72 3b |irID = M|yCurDir;|
|00001200| 0d 09 69 66 20 28 20 21 | 20 28 65 72 72 20 3d 20 |..if ( !| (err = |
|00001210| 50 42 47 65 74 43 61 74 | 49 6e 66 6f 28 26 70 62 |PBGetCat|Info(&pb|
|00001220| 2c 20 66 61 6c 73 65 29 | 29 20 29 20 7b 0d 09 20 |, false)|) ) {.. |
|00001230| 20 69 66 20 28 70 62 2e | 68 46 69 6c 65 49 6e 66 | if (pb.|hFileInf|
|00001240| 6f 2e 69 6f 46 6c 46 6e | 64 72 49 6e 66 6f 2e 66 |o.ioFlFn|drInfo.f|
|00001250| 64 54 79 70 65 20 21 3d | 20 27 50 49 43 54 27 29 |dType !=| 'PICT')|
|00001260| 20 0d 09 20 20 20 20 53 | 65 74 48 61 6e 64 6c 65 | .. S|etHandle|
|00001270| 53 69 7a 65 20 28 28 48 | 61 6e 64 6c 65 29 20 70 |Size ((H|andle) p|
|00001280| 2c 20 31 30 29 3b 2f 2a | 20 77 65 27 6c 6c 20 75 |, 10);/*| we'll u|
|00001290| 73 65 20 74 68 69 73 20 | 74 6f 20 73 69 67 6e 69 |se this |to signi|
|000012a0| 66 79 20 74 68 61 74 20 | 74 68 65 20 66 69 6c 65 |fy that |the file|
|000012b0| 20 69 73 20 74 68 65 20 | 77 72 6f 6e 67 20 74 79 | is the |wrong ty|
|000012c0| 70 65 20 2a 2f 0d 09 20 | 20 65 6c 73 65 20 7b 09 |pe */.. | else {.|
|000012d0| 09 09 09 09 09 09 09 2f | 2a 20 6d 61 6b 65 20 73 |......./|* make s|
|000012e0| 75 72 65 20 74 6f 20 70 | 72 6f 63 65 73 73 20 6f |ure to p|rocess o|
|000012f0| 6e 6c 79 20 50 49 43 54 | 73 20 2a 2f 0d 09 20 20 |nly PICT|s */.. |
|00001300| 20 20 70 62 2e 68 46 69 | 6c 65 49 6e 66 6f 2e 69 | pb.hFi|leInfo.i|
|00001310| 6f 43 6f 6d 70 6c 65 74 | 69 6f 6e 20 3d 20 6e 69 |oComplet|ion = ni|
|00001320| 6c 3b 0d 09 09 70 62 2e | 68 46 69 6c 65 49 6e 66 |l;...pb.|hFileInf|
|00001330| 6f 2e 69 6f 4e 61 6d 65 | 50 74 72 20 3d 20 26 73 |o.ioName|Ptr = &s|
|00001340| 3b 0d 09 09 70 62 2e 68 | 46 69 6c 65 49 6e 66 6f |;...pb.h|FileInfo|
|00001350| 2e 69 6f 56 52 65 66 4e | 75 6d 20 3d 20 72 65 70 |.ioVRefN|um = rep|
|00001360| 6c 79 2e 76 52 65 66 4e | 75 6d 3b 0d 09 09 70 62 |ly.vRefN|um;...pb|
|00001370| 2e 68 46 69 6c 65 49 6e | 66 6f 2e 66 69 6c 6c 65 |.hFileIn|fo.fille|
|00001380| 72 31 20 3d 20 31 3b 20 | 2f 2a 20 20 49 20 6f 6e |r1 = 1; |/* I on|
|00001390| 6c 79 20 6e 65 65 64 20 | 74 6f 20 72 65 61 64 20 |ly need |to read |
|000013a0| 2a 2f 0d 20 09 09 70 62 | 2e 68 46 69 6c 65 49 6e |*/. ..pb|.hFileIn|
|000013b0| 66 6f 2e 69 6f 46 44 69 | 72 49 6e 64 65 78 20 3d |fo.ioFDi|rIndex =|
|000013c0| 20 30 3b 09 09 09 09 09 | 09 09 2f 2a 20 54 68 65 | 0;.....|../* The|
|000013d0| 73 65 20 74 68 72 65 65 | 20 66 69 65 6c 64 73 20 |se three| fields |
|000013e0| 2a 2f 0d 20 09 09 70 62 | 2e 68 46 69 6c 65 49 6e |*/. ..pb|.hFileIn|
|000013f0| 66 6f 2e 69 6f 46 6c 41 | 74 74 72 69 62 20 3d 20 |fo.ioFlA|ttrib = |
|00001400| 20 70 62 2e 68 46 69 6c | 65 49 6e 66 6f 2e 66 69 | pb.hFil|eInfo.fi|
|00001410| 6c 6c 65 72 32 20 3d 20 | 30 3b 09 2f 2a 20 73 68 |ller2 = |0;./* sh|
|00001420| 6f 75 6c 64 20 6d 61 6b | 65 20 66 6f 72 20 69 6f |ould mak|e for io|
|00001430| 4d 69 73 63 20 2a 2f 0d | 09 09 70 62 2e 68 46 69 |Misc */.|..pb.hFi|
|00001440| 6c 65 49 6e 66 6f 2e 69 | 6f 44 69 72 49 44 20 3d |leInfo.i|oDirID =|
|00001450| 20 4d 79 43 75 72 44 69 | 72 3b 0d 09 09 69 66 20 | MyCurDi|r;...if |
|00001460| 28 21 20 28 65 72 72 20 | 3d 20 50 42 48 4f 70 65 |(! (err |= PBHOpe|
|00001470| 6e 20 28 28 48 50 61 72 | 6d 42 6c 6b 50 74 72 29 |n ((HPar|mBlkPtr)|
|00001480| 26 70 62 2c 20 66 61 6c | 73 65 29 29 20 29 20 7b |&pb, fal|se)) ) {|
|00001490| 0d 09 09 20 20 46 52 65 | 66 4e 75 6d 20 3d 20 70 |... FRe|fNum = p|
|000014a0| 62 2e 68 46 69 6c 65 49 | 6e 66 6f 2e 69 6f 46 52 |b.hFileI|nfo.ioFR|
|000014b0| 65 66 4e 75 6d 3b 0d 09 | 09 20 20 65 72 72 20 3d |efNum;..|. err =|
|000014c0| 20 47 65 74 45 4f 46 28 | 46 52 65 66 4e 75 6d 2c | GetEOF(|FRefNum,|
|000014d0| 20 26 66 4c 65 6e 67 74 | 68 29 3b 20 2f 2a 20 63 | &fLengt|h); /* c|
|000014e0| 61 6e 27 74 20 66 61 69 | 6c 20 2a 2f 0d 09 09 20 |an't fai|l */... |
|000014f0| 20 66 4c 65 6e 67 74 68 | 20 2d 3d 20 35 31 32 3b | fLength| -= 512;|
|00001500| 20 2f 2a 20 77 65 20 64 | 6f 6e 27 74 20 6e 65 65 | /* we d|on't nee|
|00001510| 64 20 74 68 65 20 66 69 | 6c 65 20 68 65 61 64 65 |d the fi|le heade|
|00001520| 72 20 2a 2f 0d 09 09 20 | 20 69 66 20 28 20 47 65 |r */... | if ( Ge|
|00001530| 74 48 61 6e 64 6c 65 53 | 69 7a 65 28 28 48 61 6e |tHandleS|ize((Han|
|00001540| 64 6c 65 29 20 70 29 20 | 3c 20 66 4c 65 6e 67 74 |dle) p) |< fLengt|
|00001550| 68 29 20 20 2f 2a 20 72 | 65 73 69 7a 65 20 68 61 |h) /* r|esize ha|
|00001560| 6e 64 6c 65 20 2a 2f 0d | 09 09 09 53 65 74 48 61 |ndle */.|...SetHa|
|00001570| 6e 64 6c 65 53 69 7a 65 | 20 28 28 48 61 6e 64 6c |ndleSize| ((Handl|
|00001580| 65 29 20 70 2c 20 66 4c | 65 6e 67 74 68 29 3b 0d |e) p, fL|ength);.|
|00001590| 09 09 20 20 69 66 20 28 | 20 21 20 28 65 72 72 20 |.. if (| ! (err |
|000015a0| 3d 20 4d 65 6d 45 72 72 | 6f 72 28 29 29 20 29 20 |= MemErr|or()) ) |
|000015b0| 7b 20 09 09 09 2f 2a 20 | 70 72 6f 62 6c 65 6d 73 |{ .../* |problems|
|000015c0| 20 72 65 73 69 7a 69 6e | 67 20 3f 20 2a 2f 0d 09 | resizin|g ? */..|
|000015d0| 09 09 65 72 72 20 3d 20 | 53 65 74 46 50 6f 73 28 |..err = |SetFPos(|
|000015e0| 46 52 65 66 4e 75 6d 2c | 20 66 73 46 72 6f 6d 53 |FRefNum,| fsFromS|
|000015f0| 74 61 72 74 2c 20 35 31 | 32 29 3b 20 2f 2a 20 6a |tart, 51|2); /* j|
|00001600| 75 6d 70 20 6f 76 65 72 | 20 66 69 6c 65 20 68 65 |ump over| file he|
|00001610| 61 64 65 72 20 2a 2f 0d | 09 09 09 48 4c 6f 63 6b |ader */.|...HLock|
|00001620| 28 28 48 61 6e 64 6c 65 | 29 20 70 29 3b 0d 09 09 |((Handle|) p);...|
|00001630| 09 65 72 72 20 3d 20 46 | 53 52 65 61 64 28 46 52 |.err = F|SRead(FR|
|00001640| 65 66 4e 75 6d 2c 20 26 | 66 4c 65 6e 67 74 68 2c |efNum, &|fLength,|
|00001650| 20 28 50 74 72 29 2a 70 | 29 3b 20 0d 09 09 09 48 | (Ptr)*p|); ....H|
|00001660| 55 6e 6c 6f 63 6b 28 28 | 48 61 6e 64 6c 65 29 20 |Unlock((|Handle) |
|00001670| 70 29 3b 0d 09 09 09 65 | 72 72 20 3d 20 46 53 43 |p);....e|rr = FSC|
|00001680| 6c 6f 73 65 28 46 52 65 | 66 4e 75 6d 29 3b 0d 09 |lose(FRe|fNum);..|
|00001690| 09 20 20 7d 0d 09 09 7d | 0d 09 20 20 7d 0d 09 7d |. }...}|.. }..}|
|000016a0| 0d 20 20 7d 0d 20 20 72 | 65 74 75 72 6e 20 65 72 |. }. r|eturn er|
|000016b0| 72 3b 0d 7d 0d 0d 2f 2a | 20 48 65 72 65 20 77 65 |r;.}../*| Here we|
|000016c0| 20 67 65 74 20 74 68 65 | 20 73 6f 75 6e 64 20 72 | get the| sound r|
|000016d0| 65 73 6f 75 72 63 65 20 | 28 77 65 20 61 73 73 75 |esource |(we assu|
|000016e0| 6d 65 20 6f 6e 6c 79 20 | 6f 6e 65 20 72 65 73 6f |me only |one reso|
|000016f0| 75 72 63 65 20 69 6e 20 | 65 61 63 68 20 66 69 6c |urce in |each fil|
|00001700| 65 29 20 0d 20 20 20 61 | 6e 64 20 70 61 73 73 20 |e) . a|nd pass |
|00001710| 69 74 20 62 61 63 6b 20 | 74 6f 20 61 64 64 20 74 |it back |to add t|
|00001720| 6f 20 74 68 65 20 6d 65 | 64 69 61 2e 0d 20 20 20 |o the me|dia.. |
|00001730| 0d 2a 2f 0d 0d 48 61 6e | 64 6c 65 20 4d 79 47 65 |.*/..Han|dle MyGe|
|00001740| 74 53 46 32 28 29 0d 0d | 7b 0d 50 6f 69 6e 74 20 |tSF2()..|{.Point |
|00001750| 64 6c 67 50 6f 73 20 3d | 20 7b 31 30 30 2c 31 30 |dlgPos =| {100,10|
|00001760| 30 7d 3b 0d 73 68 6f 72 | 74 20 46 52 65 66 4e 75 |0};.shor|t FRefNu|
|00001770| 6d 2c 20 72 65 73 46 4e | 75 6d 3b 0d 48 61 6e 64 |m, resFN|um;.Hand|
|00001780| 6c 65 20 72 65 73 48 20 | 3d 20 6e 69 6c 3b 0d 73 |le resH |= nil;.s|
|00001790| 68 6f 72 74 20 69 74 65 | 6d 48 69 74 3b 0d 53 74 |hort ite|mHit;.St|
|000017a0| 72 32 35 35 20 76 6f 6c | 4e 61 6d 65 3b 0d 73 68 |r255 vol|Name;.sh|
|000017b0| 6f 72 74 20 20 76 6f 6c | 52 65 66 3b 0d 0d 20 20 |ort vol|Ref;.. |
|000017c0| 69 66 20 28 20 28 69 74 | 65 6d 48 69 74 20 3d 20 |if ( (it|emHit = |
|000017d0| 41 6c 65 72 74 28 72 53 | 6f 75 6e 64 41 6c 65 72 |Alert(rS|oundAler|
|000017e0| 74 2c 20 6e 69 6c 29 29 | 20 3d 3d 20 6b 48 61 73 |t, nil))| == kHas|
|000017f0| 53 6f 75 6e 64 20 29 20 | 7b 20 2f 2a 20 6d 61 6b |Sound ) |{ /* mak|
|00001800| 65 20 73 75 72 65 20 75 | 73 65 72 20 68 61 73 20 |e sure u|ser has |
|00001810| 73 6f 75 6e 64 20 66 69 | 6c 65 20 2a 2f 0d 20 20 |sound fi|le */. |
|00001820| 20 20 53 46 47 65 74 46 | 69 6c 65 28 64 6c 67 50 | SFGetF|ile(dlgP|
|00001830| 6f 73 2c 20 22 5c 70 53 | 6f 75 6e 64 20 66 69 6c |os, "\pS|ound fil|
|00001840| 65 3a 22 2c 6e 69 6c 2c | 31 2c 26 74 79 70 65 4c |e:",nil,|1,&typeL|
|00001850| 69 73 74 2c 6e 69 6c 2c | 26 72 65 70 6c 79 29 3b |ist,nil,|&reply);|
|00001860| 0d 20 20 20 20 69 66 20 | 28 72 65 70 6c 79 2e 67 |. if |(reply.g|
|00001870| 6f 6f 64 29 20 7b 0d 09 | 20 20 46 52 65 66 4e 75 |ood) {..| FRefNu|
|00001880| 6d 20 3d 20 43 75 72 52 | 65 73 46 69 6c 65 28 29 |m = CurR|esFile()|
|00001890| 3b 0d 09 20 20 47 65 74 | 56 6f 6c 28 76 6f 6c 4e |;.. Get|Vol(volN|
|000018a0| 61 6d 65 2c 20 26 76 6f | 6c 52 65 66 29 3b 0d 09 |ame, &vo|lRef);..|
|000018b0| 20 20 53 65 74 56 6f 6c | 28 27 27 2c 72 65 70 6c | SetVol|('',repl|
|000018c0| 79 2e 76 52 65 66 4e 75 | 6d 29 3b 0d 09 20 20 72 |y.vRefNu|m);.. r|
|000018d0| 65 73 46 4e 75 6d 20 3d | 20 4f 70 65 6e 52 65 73 |esFNum =| OpenRes|
|000018e0| 46 69 6c 65 28 72 65 70 | 6c 79 2e 66 4e 61 6d 65 |File(rep|ly.fName|
|000018f0| 29 3b 0d 09 20 20 69 66 | 20 28 20 72 65 73 48 20 |);.. if| ( resH |
|00001900| 3d 20 47 65 74 31 49 6e | 64 52 65 73 6f 75 72 63 |= Get1In|dResourc|
|00001910| 65 28 27 73 6e 64 20 27 | 2c 31 29 20 29 20 2f 2a |e('snd '|,1) ) /*|
|00001920| 20 61 73 73 75 6d 69 6e | 67 20 6f 6e 65 20 72 65 | assumin|g one re|
|00001930| 73 6f 75 72 63 65 20 66 | 6f 72 20 66 69 6c 65 20 |source f|or file |
|00001940| 2a 2f 0d 09 20 20 09 44 | 65 74 61 63 68 52 65 73 |*/.. .D|etachRes|
|00001950| 6f 75 72 63 65 28 72 65 | 73 48 29 3b 0d 09 20 20 |ource(re|sH);.. |
|00001960| 43 6c 6f 73 65 52 65 73 | 46 69 6c 65 28 72 65 73 |CloseRes|File(res|
|00001970| 46 4e 75 6d 29 3b 0d 09 | 20 20 55 73 65 52 65 73 |FNum);..| UseRes|
|00001980| 46 69 6c 65 28 46 52 65 | 66 4e 75 6d 29 3b 0d 09 |File(FRe|fNum);..|
|00001990| 20 20 53 65 74 56 6f 6c | 28 76 6f 6c 4e 61 6d 65 | SetVol|(volName|
|000019a0| 2c 20 76 6f 6c 52 65 66 | 29 3b 0d 09 7d 0d 20 20 |, volRef|);..}. |
|000019b0| 7d 0d 20 20 72 65 74 75 | 72 6e 20 72 65 73 48 3b |}. retu|rn resH;|
|000019c0| 0d 7d 0d 0d 2f 2a 20 54 | 68 65 20 63 6f 64 65 20 |.}../* T|he code |
|000019d0| 74 68 61 74 20 61 64 64 | 73 20 61 20 73 6f 75 6e |that add|s a soun|
|000019e0| 64 20 62 79 20 72 65 66 | 65 72 65 6e 63 65 20 63 |d by ref|erence c|
|000019f0| 61 6c 6c 73 20 74 68 69 | 73 20 63 6f 64 65 20 69 |alls thi|s code i|
|00001a00| 6e 20 6f 72 64 65 72 20 | 74 6f 20 67 65 74 20 61 |n order |to get a|
|00001a10| 20 66 69 6c 65 20 77 68 | 65 72 65 0d 20 20 20 74 | file wh|ere. t|
|00001a20| 68 65 20 73 6f 75 6e 64 | 20 64 61 74 61 20 69 73 |he sound| data is|
|00001a30| 20 6c 6f 63 61 74 65 64 | 3b 20 74 68 65 20 64 69 | located|; the di|
|00001a40| 66 66 65 72 65 6e 63 65 | 20 69 73 20 74 68 61 74 |fference| is that|
|00001a50| 20 68 65 72 65 20 77 65 | 20 6e 65 65 64 20 74 6f | here we| need to|
|00001a60| 20 6b 6e 6f 77 20 74 68 | 65 20 6f 66 66 73 65 74 | know th|e offset|
|00001a70| 0d 20 20 20 74 6f 20 74 | 68 65 20 64 61 74 61 20 |. to t|he data |
|00001a80| 61 6e 64 20 74 68 69 73 | 20 6d 61 6b 65 73 20 72 |and this| makes r|
|00001a90| 65 73 6f 75 72 63 65 73 | 20 6b 69 6e 64 20 6f 66 |esources| kind of|
|00001aa0| 20 64 69 66 66 69 63 75 | 6c 74 20 74 6f 20 68 61 | difficu|lt to ha|
|00001ab0| 6e 64 6c 65 2e 0d 2a 2f | 0d 4f 53 45 72 72 20 4d |ndle..*/|.OSErr M|
|00001ac0| 79 47 65 74 53 46 28 6d | 79 53 70 65 63 29 0d 46 |yGetSF(m|ySpec).F|
|00001ad0| 53 53 70 65 63 20 20 20 | 2a 6d 79 53 70 65 63 3b |SSpec |*mySpec;|
|00001ae0| 0d 7b 0d 0d 4f 53 45 72 | 72 20 65 72 72 3b 0d 50 |.{..OSEr|r err;.P|
|00001af0| 6f 69 6e 74 20 64 6c 67 | 50 6f 73 20 3d 20 7b 31 |oint dlg|Pos = {1|
|00001b00| 30 30 2c 31 30 30 7d 3b | 0d 73 68 6f 72 74 20 69 |00,100};|.short i|
|00001b10| 74 65 6d 48 69 74 3b 0d | 0d 20 20 69 66 20 28 20 |temHit;.|. if ( |
|00001b20| 28 69 74 65 6d 48 69 74 | 20 3d 20 41 6c 65 72 74 |(itemHit| = Alert|
|00001b30| 28 72 53 6f 75 6e 64 41 | 6c 65 72 74 2c 20 6e 69 |(rSoundA|lert, ni|
|00001b40| 6c 29 29 20 3d 3d 20 6b | 48 61 73 53 6f 75 6e 64 |l)) == k|HasSound|
|00001b50| 20 29 20 7b 20 2f 2a 20 | 6d 61 6b 65 20 73 75 72 | ) { /* |make sur|
|00001b60| 65 20 75 73 65 72 20 68 | 61 73 20 73 6f 75 6e 64 |e user h|as sound|
|00001b70| 20 66 69 6c 65 20 2a 2f | 0d 20 20 20 20 53 46 47 | file */|. SFG|
|00001b80| 65 74 46 69 6c 65 28 64 | 6c 67 50 6f 73 2c 20 22 |etFile(d|lgPos, "|
|00001b90| 5c 70 53 6f 75 6e 64 20 | 66 69 6c 65 3a 22 2c 6e |\pSound |file:",n|
|00001ba0| 69 6c 2c 31 2c 26 74 79 | 70 65 4c 69 73 74 2c 6e |il,1,&ty|peList,n|
|00001bb0| 69 6c 2c 26 72 65 70 6c | 79 29 3b 0d 20 20 20 20 |il,&repl|y);. |
|00001bc0| 69 66 20 28 72 65 70 6c | 79 2e 67 6f 6f 64 29 20 |if (repl|y.good) |
|00001bd0| 7b 0d 09 20 20 65 72 72 | 20 3d 20 46 53 4d 61 6b |{.. err| = FSMak|
|00001be0| 65 46 53 53 70 65 63 28 | 72 65 70 6c 79 2e 76 52 |eFSSpec(|reply.vR|
|00001bf0| 65 66 4e 75 6d 2c 20 30 | 2c 20 28 75 6e 73 69 67 |efNum, 0|, (unsig|
|00001c00| 6e 65 64 20 63 68 61 72 | 20 2a 29 20 72 65 70 6c |ned char| *) repl|
|00001c10| 79 2e 66 4e 61 6d 65 2c | 20 6d 79 53 70 65 63 29 |y.fName,| mySpec)|
|00001c20| 3b 0d 09 7d 0d 20 20 7d | 0d 20 20 65 6c 73 65 20 |;..}. }|. else |
|00001c30| 0d 20 20 20 20 65 72 72 | 20 3d 20 66 6e 66 45 72 |. err| = fnfEr|
|00001c40| 72 3b 0d 09 0d 20 20 72 | 65 74 75 72 6e 20 65 72 |r;... r|eturn er|
|00001c50| 72 3b 0d 7d 00 00 00 00 | 00 00 00 00 00 00 00 00 |r;.}....|........|
|00001c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c80| 00 00 01 00 00 00 01 ea | 00 00 00 ea 00 00 00 4a |........|.......J|
|00001c90| 4d 41 43 76 ff ff a2 21 | 83 bd 00 00 02 e6 17 50 |MACv...!|.......P|
|00001ca0| 61 73 63 61 6c 20 53 6f | 75 72 63 65 20 43 6f 6e |ascal So|urce Con|
|00001cb0| 14 53 69 6d 70 6c 65 4f | 75 74 46 69 6c 65 53 74 |.SimpleO|utFileSt|
|00001cc0| 75 66 66 2e 63 4f 02 00 | 00 00 54 45 58 54 4d 50 |uff.cO..|..TEXTMP|
|00001cd0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 00 00 00 |..TEXTMP|S ......|
|00001ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cf0| 00 00 a4 1c d9 b7 00 00 | 1b d4 00 00 02 34 09 4d |........|.....4.M|
|00001d00| 50 57 20 53 68 65 6c 6c | 75 72 63 65 20 43 6f 6e |PW Shell|urce Con|
|00001d10| 76 65 72 74 65 72 00 00 | 00 00 00 00 00 00 07 02 |verter..|........|
|00001d20| 4d 52 65 63 ff fe a3 56 | fe a1 00 00 00 02 16 4d |MRec...V|.......M|
|00001d30| 61 63 52 65 63 6f 72 64 | 65 72 20 44 72 76 72 20 |acRecord|er Drvr |
|00001d40| 31 2e 30 62 37 72 00 00 | 00 00 00 00 00 00 07 02 |1.0b7r..|........|
|00001d50| 4d 52 65 63 ff ff a3 56 | fe a1 00 00 0b e4 16 4d |MRec...V|.......M|
|00001d60| 61 63 52 65 63 6f 72 64 | 65 72 20 44 72 76 72 20 |acRecord|er Drvr |
|00001d70| 31 2e 30 62 37 72 00 00 | 00 00 00 00 00 00 07 02 |1.0b7r..|........|
|00001d80| 00 00 00 78 00 03 00 00 | 00 48 00 48 00 00 00 00 |...x....|.H.H....|
|00001d90| 02 da 02 28 ff e1 ff e2 | 02 f9 02 46 03 47 05 28 |...(....|...F.G.(|
|00001da0| 03 fc 00 02 00 00 00 48 | 00 48 00 00 00 00 02 da |.......H|.H......|
|00001db0| 02 28 00 01 00 00 00 64 | 00 00 00 01 00 01 01 01 |.(.....d|........|
|00001dc0| 00 00 00 01 27 0f 00 01 | 00 01 00 00 00 00 00 00 |....'...|........|
|00001dd0| 00 00 00 00 00 00 00 02 | 00 19 01 90 00 00 00 00 |........|........|
|00001de0| 00 40 00 00 00 00 00 00 | 00 00 00 01 00 00 00 00 |.@......|........|
|00001df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 48 |........|.......H|
|00001e00| 00 09 4d 6f 6e 61 63 6f | 00 4a 02 8c 00 4a 04 9e |..Monaco|.J...J..|
|00001e10| 01 a1 02 8c 01 a1 04 9e | 7f f5 80 0a 7f f5 7f f5 |........|........|
|00001e20| 00 00 00 06 00 04 00 37 | 00 0c 01 81 02 53 00 37 |.......7|.....S.7|
|00001e30| 00 0c 01 81 02 53 a4 8f | c4 3c 00 00 06 8f 00 00 |.....S..|.<......|
|00001e40| 06 a0 00 00 16 b5 01 00 | 00 00 00 1e 00 37 00 0c |........|.....7..|
|00001e50| 01 81 02 53 00 37 00 0c | 01 81 02 53 00 00 16 b5 |...S.7..|...S....|
|00001e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 01 00 00 00 |........|........|
|00001e70| 01 ea 00 00 00 ea 00 00 | 00 4a 00 7e 9a 7c 0d 98 |........|.J.~.|..|
|00001e80| 00 00 00 1c 00 4a 00 00 | 4d 50 53 52 00 02 00 0a |.....J..|MPSR....|
|00001e90| 03 ee ff ff 00 00 00 00 | 00 00 00 00 03 ed ff ff |........|........|
|00001ea0| 00 00 00 7c 00 00 00 00 | 03 f0 ff ff 00 00 00 c8 |...|....|........|
|00001eb0| 00 80 98 8c 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+